package com.sci.feign;

import com.sci.entity.Business;
import com.sci.entity.Food;
import com.sci.feign.impl.BusinessServiceClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "business-service",fallback = BusinessServiceClientFallback.class)
public interface BusinessServiceClient {
    @GetMapping("business/id/{businessId}")
    Business getBusinessById(@PathVariable(value = "businessId") String businessId);

    @GetMapping("food/{foodId}")
    Food getFoodById(@PathVariable(name = "foodId") int foodId);
}
